#include <iostream>
#include <string>

class RentHouse
{
public:
    virtual void rentHouse() = 0;
};

class Landlord : public RentHouse
{
public:
    void rentHouse() override { std::cout << "将房子租出去" << std::endl; }
};

class Intermediator : public RentHouse
{
public:
    void rentHouse()
    {
        std::cout << "发布租房信息" << std::endl;
        std::cout << "待人看房" << std::endl;
        _landlord.rentHouse();
        std::cout << "售后" << std::endl;
    }
private:
    Landlord _landlord;
};

int main()
{
    Intermediator inter;
    inter.rentHouse();
    return 0;
}